#include "stdafx.h"
#include "MonitorBuffer.h"




void MonitorBuffer::Initialize()
{

	NOTIMPL

}

XUINT32 MonitorBuffer::TotalAvailableOut()
{

	NOTIMPL

}

XUINT32 MonitorBuffer::ContiguousAvailableOut()
{

	NOTIMPL

}

void * MonitorBuffer::pOut()
{

	NOTIMPL

}

void MonitorBuffer::AdvanceOut(XUINT32)
{

	NOTIMPL

}

XUINT32 MonitorBuffer::TotalAvailableIn()
{

	unsigned int result;
	unsigned int iIn;

	iIn = this->m_out;
	if ( *(DWORD *)&this->m_buffer[0] <= iIn )
		result = *(DWORD *)&this->m_buffer[0] + 65536 - iIn - 1;
	else
		result = *(DWORD *)&this->m_buffer[0] - iIn - 1;
	return result;

}

XUINT32 MonitorBuffer::ContiguousAvailableIn()
{

	unsigned int result;
	unsigned int iIn;

	iIn = this->m_out;
	if ( *(DWORD *)&this->m_buffer[0] <= iIn )
	{
		if ( *(DWORD *)&this->m_buffer[0] )
			result = 65536 - iIn;
		else
			result = 65536 - iIn - 1;
	}
	else
	{
		result = *(DWORD *)&this->m_buffer[0] - iIn - 1;
	}
	return result;

}

void * MonitorBuffer::pIn()
{

	return &this->m_buffer[this->m_out + 4];

}

void MonitorBuffer::PeekBytes(XUINT32, void *)
{

	NOTIMPL

}

void MonitorBuffer::ReadBytes(XUINT32, void *)
{

	NOTIMPL

}

XUINT32 MonitorBuffer::PeekType()
{

	NOTIMPL

}
